package entity;

/**
 * @Author Corday 天涯
 * @Date 2022/3/8 10:44
 * 实体类
 */
public class User {
    private  int uid;
    private  String username;
    private  String password;
//    用户状态
    private  int state;
    public User(){}

    public User(int uid, String username, String password, int state) {
        this.uid = uid;
        this.username = username;
        this.password = password;
        this.state = state;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Override
    public String toString() {
        String str = state==1?"已登陆":"未登陆";
        return "uid:"+uid+" 用户名:"+username+" 状态:"+str;
    }
}
